.class Lrexsee/core/transportation/RexseeUpload$1;
.super Ljava/lang/Thread;
.source "RexseeUpload.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/transportation/RexseeUpload;->upload(Ljava/lang/String;Ljava/lang/String;Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field private stop:Z

.field private final stopRunnable:Ljava/lang/Runnable;

.field final synthetic this$0:Lrexsee/core/transportation/RexseeUpload;

.field private final synthetic val$file:Ljava/io/File;

.field private final synthetic val$fileName:Ljava/lang/String;

.field private final synthetic val$name:Ljava/lang/String;

.field private final synthetic val$path:Ljava/lang/String;

.field private final synthetic val$progressListener:Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

.field private final synthetic val$uploadUrl:Ljava/lang/String;


# direct methods
.method constructor <init>(Lrexsee/core/transportation/RexseeUpload;Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)V
    .locals 1

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    iput-object p2, p0, Lrexsee/core/transportation/RexseeUpload$1;->val$progressListener:Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

    iput-object p3, p0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    iput-object p4, p0, Lrexsee/core/transportation/RexseeUpload$1;->val$uploadUrl:Ljava/lang/String;

    iput-object p5, p0, Lrexsee/core/transportation/RexseeUpload$1;->val$name:Ljava/lang/String;

    iput-object p6, p0, Lrexsee/core/transportation/RexseeUpload$1;->val$fileName:Ljava/lang/String;

    iput-object p7, p0, Lrexsee/core/transportation/RexseeUpload$1;->val$file:Ljava/io/File;

    .line 120
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    .line 121
    const/4 v0, 0x0

    iput-boolean v0, p0, Lrexsee/core/transportation/RexseeUpload$1;->stop:Z

    .line 122
    new-instance v0, Lrexsee/core/transportation/RexseeUpload$1$1;

    invoke-direct {v0, p0}, Lrexsee/core/transportation/RexseeUpload$1$1;-><init>(Lrexsee/core/transportation/RexseeUpload$1;)V

    iput-object v0, p0, Lrexsee/core/transportation/RexseeUpload$1;->stopRunnable:Ljava/lang/Runnable;

    return-void
.end method

.method static synthetic access$0(Lrexsee/core/transportation/RexseeUpload$1;Z)V
    .locals 0

    .prologue
    .line 121
    iput-boolean p1, p0, Lrexsee/core/transportation/RexseeUpload$1;->stop:Z

    return-void
.end method

.method static synthetic access$1(Lrexsee/core/transportation/RexseeUpload$1;)Lrexsee/core/transportation/RexseeUpload;
    .locals 1

    .prologue
    .line 120
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    return-object v0
.end method


# virtual methods
.method public run()V
    .locals 35

    .prologue
    .line 131
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    move-object v4, v0

    iget-object v4, v4, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v4, v4, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v4}, Lrexsee/core/application/RexseeApplication;->getTimeout()I

    move-result v4

    move v0, v4

    mul-int/lit16 v0, v0, 0x3e8

    move/from16 v32, v0

    .line 133
    .local v32, "timeout":I
    :try_start_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$progressListener:Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

    move-object v4, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    move-object v5, v0

    const/4 v6, -0x1

    const/4 v7, 0x0

    const/4 v8, 0x0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->stopRunnable:Ljava/lang/Runnable;

    move-object v9, v0

    invoke-virtual/range {v4 .. v9}, Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;->run(Ljava/lang/String;IIILjava/lang/Runnable;)V

    .line 134
    new-instance v33, Ljava/net/URL;

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$uploadUrl:Ljava/lang/String;

    move-object v4, v0

    move-object/from16 v0, v33

    move-object v1, v4

    invoke-direct {v0, v1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    .line 135
    .local v33, "url":Ljava/net/URL;
    invoke-virtual/range {v33 .. v33}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;

    move-result-object v34

    check-cast v34, Ljava/net/HttpURLConnection;

    .line 136
    .local v34, "urlConnection":Ljava/net/HttpURLConnection;
    const-string v4, "POST"

    move-object/from16 v0, v34

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V

    .line 137
    const/4 v4, 0x1

    move-object/from16 v0, v34

    move v1, v4

    invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setDoInput(Z)V

    .line 138
    const/4 v4, 0x1

    move-object/from16 v0, v34

    move v1, v4

    invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V

    .line 139
    move-object/from16 v0, v34

    move/from16 v1, v32

    invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V

    .line 140
    move-object/from16 v0, v34

    move/from16 v1, v32

    invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setReadTimeout(I)V

    .line 141
    const/4 v4, 0x0

    move-object/from16 v0, v34

    move v1, v4

    invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setUseCaches(Z)V

    .line 142
    invoke-static {}, Landroid/webkit/CookieManager;->getInstance()Landroid/webkit/CookieManager;

    move-result-object v20

    .line 143
    .local v20, "cookieManager":Landroid/webkit/CookieManager;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$uploadUrl:Ljava/lang/String;

    move-object v4, v0

    move-object/from16 v0, v20

    move-object v1, v4

    invoke-virtual {v0, v1}, Landroid/webkit/CookieManager;->getCookie(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v18

    .line 144
    .local v18, "cookie":Ljava/lang/String;
    if-eqz v18, :cond_0

    .line 145
    const-string v4, "Cookie"

    move-object/from16 v0, v34

    move-object v1, v4

    move-object/from16 v2, v18

    invoke-virtual {v0, v1, v2}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 148
    :cond_0
    const-string v4, "User-Agent"

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    move-object v5, v0

    iget-object v5, v5, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {v5}, Lrexsee/core/browser/Browser;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v5

    invoke-virtual {v5}, Landroid/webkit/WebSettings;->getUserAgentString()Ljava/lang/String;

    move-result-object v5

    move-object/from16 v0, v34

    move-object v1, v4

    move-object v2, v5

    invoke-virtual {v0, v1, v2}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 149
    const-string v4, "Connection"

    const-string v5, "Keep-Alive"

    move-object/from16 v0, v34

    move-object v1, v4

    move-object v2, v5

    invoke-virtual {v0, v1, v2}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 150
    const-string v4, "Content-Type"

    const-string v5, "multipart/form-data;boundary=*****"

    move-object/from16 v0, v34

    move-object v1, v4

    move-object v2, v5

    invoke-virtual {v0, v1, v2}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 151
    invoke-virtual/range {v34 .. v34}, Ljava/net/HttpURLConnection;->connect()V

    .line 152
    new-instance v22, Ljava/io/DataOutputStream;

    invoke-virtual/range {v34 .. v34}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v4

    move-object/from16 v0, v22

    move-object v1, v4

    invoke-direct {v0, v1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V

    .line 153
    .local v22, "dos":Ljava/io/DataOutputStream;
    const-string v4, "--*****\r\n"

    move-object/from16 v0, v22

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 154
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "Content-Disposition: form-data; name=\""

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$name:Ljava/lang/String;

    move-object v5, v0

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "\"; filename=\""

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$fileName:Ljava/lang/String;

    move-object v5, v0

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "\"; "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "\r\n"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    move-object/from16 v0, v22

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 156
    const-string v4, "\r\n"

    move-object/from16 v0, v22

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 157
    new-instance v24, Ljava/io/FileInputStream;

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$file:Ljava/io/File;

    move-object v4, v0

    move-object/from16 v0, v24

    move-object v1, v4

    invoke-direct {v0, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V

    .line 158
    .local v24, "fileInputStream":Ljava/io/FileInputStream;
    invoke-virtual/range {v24 .. v24}, Ljava/io/FileInputStream;->available()I

    move-result v7

    .line 159
    .local v7, "totalSize":I
    const/4 v8, 0x0

    .line 160
    .local v8, "uploadedSize":I
    const/16 v4, 0x400

    move v0, v4

    new-array v0, v0, [B

    move-object/from16 v16, v0

    .line 161
    .local v16, "buffer":[B
    const/16 v17, 0x0

    .line 162
    .local v17, "bufferLength":I
    :goto_0
    move-object/from16 v0, v24

    move-object/from16 v1, v16

    invoke-virtual {v0, v1}, Ljava/io/FileInputStream;->read([B)I

    move-result v17

    if-lez v17, :cond_1

    move-object/from16 v0, p0

    iget-boolean v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->stop:Z

    move v4, v0

    if-eqz v4, :cond_4

    .line 167
    :cond_1
    const-string v4, "\r\n"

    move-object/from16 v0, v22

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 168
    const-string v4, "--*****--\r\n"

    move-object/from16 v0, v22

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 169
    invoke-virtual/range {v24 .. v24}, Ljava/io/FileInputStream;->close()V

    .line 170
    invoke-virtual/range {v22 .. v22}, Ljava/io/DataOutputStream;->flush()V

    .line 171
    invoke-virtual/range {v22 .. v22}, Ljava/io/DataOutputStream;->close()V

    .line 172
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$progressListener:Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

    move-object v4, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    move-object v5, v0

    const/4 v6, 0x1

    const/4 v9, 0x0

    invoke-virtual/range {v4 .. v9}, Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;->run(Ljava/lang/String;IIILjava/lang/Runnable;)V

    .line 173
    invoke-virtual/range {v20 .. v20}, Landroid/webkit/CookieManager;->acceptCookie()Z

    move-result v4

    if-eqz v4, :cond_2

    .line 175
    const/16 v21, 0x0

    .line 176
    .local v21, "cookieVal":Ljava/lang/String;
    const/16 v19, 0x0

    .line 177
    .local v19, "cookieKey":Ljava/lang/String;
    const-string v30, ""

    .line 178
    .local v30, "sessionCookie":Ljava/lang/String;
    const/16 v25, 0x1

    .local v25, "i":I
    :goto_1
    move-object/from16 v0, v34

    move/from16 v1, v25

    invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->getHeaderFieldKey(I)Ljava/lang/String;

    move-result-object v19

    if-nez v19, :cond_5

    .line 186
    const-string v4, ""

    move-object/from16 v0, v30

    move-object v1, v4

    if-eq v0, v1, :cond_2

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$uploadUrl:Ljava/lang/String;

    move-object v4, v0

    move-object/from16 v0, v20

    move-object v1, v4

    move-object/from16 v2, v21

    invoke-virtual {v0, v1, v2}, Landroid/webkit/CookieManager;->setCookie(Ljava/lang/String;Ljava/lang/String;)V

    .line 188
    .end local v19    # "cookieKey":Ljava/lang/String;
    .end local v21    # "cookieVal":Ljava/lang/String;
    .end local v25    # "i":I
    .end local v30    # "sessionCookie":Ljava/lang/String;
    :cond_2
    invoke-virtual/range {v34 .. v34}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;

    move-result-object v28

    .line 189
    .local v28, "responseStream":Ljava/io/InputStream;
    new-instance v29, Ljava/io/InputStreamReader;

    move-object/from16 v0, v29

    move-object/from16 v1, v28

    invoke-direct {v0, v1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    .line 190
    .local v29, "responseStreamReader":Ljava/io/InputStreamReader;
    new-instance v15, Ljava/io/BufferedReader;

    move-object v0, v15

    move-object/from16 v1, v29

    invoke-direct {v0, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 191
    .local v15, "bufReader":Ljava/io/BufferedReader;
    const/16 v26, 0x0

    .line 192
    .local v26, "line":Ljava/lang/String;
    const-string v27, ""

    .line 193
    .local v27, "response":Ljava/lang/String;
    :goto_2
    invoke-virtual {v15}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v26

    if-nez v26, :cond_7

    .line 196
    invoke-virtual/range {v28 .. v28}, Ljava/io/InputStream;->close()V

    .line 197
    invoke-virtual/range {v34 .. v34}, Ljava/net/HttpURLConnection;->disconnect()V

    .line 198
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$progressListener:Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

    move-object v4, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    move-object v5, v0

    const/4 v6, 0x2

    const/4 v9, 0x0

    invoke-virtual/range {v4 .. v9}, Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;->run(Ljava/lang/String;IIILjava/lang/Runnable;)V

    .line 199
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    move-object v4, v0

    iget-object v4, v4, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v4, v4, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v5, "onUploadFinished"

    const/4 v6, 0x2

    new-array v6, v6, [Ljava/lang/String;

    const/4 v7, 0x0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    move-object v8, v0

    .end local v7    # "totalSize":I
    .end local v8    # "uploadedSize":I
    aput-object v8, v6, v7

    const/4 v7, 0x1

    aput-object v27, v6, v7

    invoke-virtual {v4, v5, v6}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;[Ljava/lang/String;)V

    .line 200
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    move-object v4, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$uploadUrl:Ljava/lang/String;

    move-object v5, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$name:Ljava/lang/String;

    move-object v6, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$progressListener:Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

    move-object v7, v0

    invoke-virtual {v4, v5, v6, v7}, Lrexsee/core/transportation/RexseeUpload;->upload(Ljava/lang/String;Ljava/lang/String;Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;)V

    .line 214
    .end local v15    # "bufReader":Ljava/io/BufferedReader;
    .end local v16    # "buffer":[B
    .end local v17    # "bufferLength":I
    .end local v18    # "cookie":Ljava/lang/String;
    .end local v20    # "cookieManager":Landroid/webkit/CookieManager;
    .end local v22    # "dos":Ljava/io/DataOutputStream;
    .end local v24    # "fileInputStream":Ljava/io/FileInputStream;
    .end local v26    # "line":Ljava/lang/String;
    .end local v27    # "response":Ljava/lang/String;
    .end local v28    # "responseStream":Ljava/io/InputStream;
    .end local v29    # "responseStreamReader":Ljava/io/InputStreamReader;
    .end local v33    # "url":Ljava/net/URL;
    .end local v34    # "urlConnection":Ljava/net/HttpURLConnection;
    :cond_3
    :goto_3
    return-void

    .line 163
    .restart local v7    # "totalSize":I
    .restart local v8    # "uploadedSize":I
    .restart local v16    # "buffer":[B
    .restart local v17    # "bufferLength":I
    .restart local v18    # "cookie":Ljava/lang/String;
    .restart local v20    # "cookieManager":Landroid/webkit/CookieManager;
    .restart local v22    # "dos":Ljava/io/DataOutputStream;
    .restart local v24    # "fileInputStream":Ljava/io/FileInputStream;
    .restart local v33    # "url":Ljava/net/URL;
    .restart local v34    # "urlConnection":Ljava/net/HttpURLConnection;
    :cond_4
    const/4 v4, 0x0

    move-object/from16 v0, v22

    move-object/from16 v1, v16

    move v2, v4

    move/from16 v3, v17

    invoke-virtual {v0, v1, v2, v3}, Ljava/io/DataOutputStream;->write([BII)V

    .line 164
    add-int v8, v8, v17

    .line 165
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$progressListener:Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

    move-object v4, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    move-object v5, v0

    const/4 v6, 0x0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->stopRunnable:Ljava/lang/Runnable;

    move-object v9, v0

    invoke-virtual/range {v4 .. v9}, Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;->run(Ljava/lang/String;IIILjava/lang/Runnable;)V
    :try_end_0
    .catch Ljava/net/SocketTimeoutException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    goto/16 :goto_0

    .line 201
    .end local v7    # "totalSize":I
    .end local v8    # "uploadedSize":I
    .end local v16    # "buffer":[B
    .end local v17    # "bufferLength":I
    .end local v18    # "cookie":Ljava/lang/String;
    .end local v20    # "cookieManager":Landroid/webkit/CookieManager;
    .end local v22    # "dos":Ljava/io/DataOutputStream;
    .end local v24    # "fileInputStream":Ljava/io/FileInputStream;
    .end local v33    # "url":Ljava/net/URL;
    .end local v34    # "urlConnection":Ljava/net/HttpURLConnection;
    :catch_0
    move-exception v4

    move-object/from16 v31, v4

    .line 202
    .local v31, "ste":Ljava/net/SocketTimeoutException;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    move-object v4, v0

    const/4 v5, -0x1

    invoke-static {v4, v5}, Lrexsee/core/transportation/RexseeUpload;->access$1(Lrexsee/core/transportation/RexseeUpload;I)V

    .line 203
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->stop:Z

    move v4, v0

    if-nez v4, :cond_3

    .line 204
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$progressListener:Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

    move-object v9, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    move-object v10, v0

    const/4 v11, -0x2

    const/4 v12, 0x0

    const/4 v13, 0x0

    const/4 v14, 0x0

    invoke-virtual/range {v9 .. v14}, Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;->run(Ljava/lang/String;IIILjava/lang/Runnable;)V

    .line 205
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    move-object v4, v0

    iget-object v4, v4, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v4, v4, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v5, "onUploadTimeout"

    const/4 v6, 0x2

    new-array v6, v6, [Ljava/lang/String;

    const/4 v7, 0x0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    move-object v8, v0

    aput-object v8, v6, v7

    const/4 v7, 0x1

    invoke-static/range {v32 .. v32}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v8

    aput-object v8, v6, v7

    invoke-virtual {v4, v5, v6}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;[Ljava/lang/String;)V

    goto :goto_3

    .line 179
    .end local v31    # "ste":Ljava/net/SocketTimeoutException;
    .restart local v7    # "totalSize":I
    .restart local v8    # "uploadedSize":I
    .restart local v16    # "buffer":[B
    .restart local v17    # "bufferLength":I
    .restart local v18    # "cookie":Ljava/lang/String;
    .restart local v19    # "cookieKey":Ljava/lang/String;
    .restart local v20    # "cookieManager":Landroid/webkit/CookieManager;
    .restart local v21    # "cookieVal":Ljava/lang/String;
    .restart local v22    # "dos":Ljava/io/DataOutputStream;
    .restart local v24    # "fileInputStream":Ljava/io/FileInputStream;
    .restart local v25    # "i":I
    .restart local v30    # "sessionCookie":Ljava/lang/String;
    .restart local v33    # "url":Ljava/net/URL;
    .restart local v34    # "urlConnection":Ljava/net/HttpURLConnection;
    :cond_5
    :try_start_1
    const-string v4, "set-cookie"

    move-object/from16 v0, v19

    move-object v1, v4

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_6

    .line 180
    move-object/from16 v0, v34

    move/from16 v1, v25

    invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->getHeaderField(I)Ljava/lang/String;

    move-result-object v21

    .line 181
    const/4 v4, 0x0

    const-string v5, ";"

    move-object/from16 v0, v21

    move-object v1, v5

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v5

    move-object/from16 v0, v21

    move v1, v4

    move v2, v5

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v21

    .line 182
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-static/range {v30 .. v30}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object v0, v4

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, ";"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v30

    .line 178
    :cond_6
    add-int/lit8 v25, v25, 0x1

    goto/16 :goto_1

    .line 194
    .end local v19    # "cookieKey":Ljava/lang/String;
    .end local v21    # "cookieVal":Ljava/lang/String;
    .end local v25    # "i":I
    .end local v30    # "sessionCookie":Ljava/lang/String;
    .restart local v15    # "bufReader":Ljava/io/BufferedReader;
    .restart local v26    # "line":Ljava/lang/String;
    .restart local v27    # "response":Ljava/lang/String;
    .restart local v28    # "responseStream":Ljava/io/InputStream;
    .restart local v29    # "responseStreamReader":Ljava/io/InputStreamReader;
    :cond_7
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-static/range {v27 .. v27}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object v0, v4

    move-object/from16 v1, v26

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_1
    .catch Ljava/net/SocketTimeoutException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    move-result-object v27

    goto/16 :goto_2

    .line 207
    .end local v7    # "totalSize":I
    .end local v8    # "uploadedSize":I
    .end local v15    # "bufReader":Ljava/io/BufferedReader;
    .end local v16    # "buffer":[B
    .end local v17    # "bufferLength":I
    .end local v18    # "cookie":Ljava/lang/String;
    .end local v20    # "cookieManager":Landroid/webkit/CookieManager;
    .end local v22    # "dos":Ljava/io/DataOutputStream;
    .end local v24    # "fileInputStream":Ljava/io/FileInputStream;
    .end local v26    # "line":Ljava/lang/String;
    .end local v27    # "response":Ljava/lang/String;
    .end local v28    # "responseStream":Ljava/io/InputStream;
    .end local v29    # "responseStreamReader":Ljava/io/InputStreamReader;
    .end local v33    # "url":Ljava/net/URL;
    .end local v34    # "urlConnection":Ljava/net/HttpURLConnection;
    :catch_1
    move-exception v4

    move-object/from16 v23, v4

    .line 208
    .local v23, "e":Ljava/lang/Exception;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    move-object v4, v0

    const/4 v5, -0x1

    invoke-static {v4, v5}, Lrexsee/core/transportation/RexseeUpload;->access$1(Lrexsee/core/transportation/RexseeUpload;I)V

    .line 209
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->stop:Z

    move v4, v0

    if-nez v4, :cond_3

    .line 210
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$progressListener:Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

    move-object v9, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    move-object v10, v0

    const/4 v11, -0x3

    const/4 v12, 0x0

    const/4 v13, 0x0

    const/4 v14, 0x0

    invoke-virtual/range {v9 .. v14}, Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;->run(Ljava/lang/String;IIILjava/lang/Runnable;)V

    .line 211
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    move-object v4, v0

    iget-object v4, v4, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->this$0:Lrexsee/core/transportation/RexseeUpload;

    move-object v5, v0

    invoke-virtual {v5}, Lrexsee/core/transportation/RexseeUpload;->getInterfaceName()Ljava/lang/String;

    move-result-object v5

    new-instance v6, Ljava/lang/StringBuilder;

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/core/transportation/RexseeUpload$1;->val$path:Ljava/lang/String;

    move-object v7, v0

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v7

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v7, ":"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual/range {v23 .. v23}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v4, v5, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    goto/16 :goto_3
.end method
